﻿define(['util', 'ajax'], function () {
    "use strict";

    var exports = {},
         ViewModel;    

    ViewModel = function (data) {
        
        var self = this;        
        self.id = ko.observable(data.id);
        self.name = ko.observable(data.name);
        self.value = ko.observable(data.value);                
    };

    exports.exec = function (sectionId, model) {
        var viewModel = new ViewModel(model);
        ko.applyBindings(viewModel, document.getElementById(sectionId));
    };

    return exports;
});